﻿using UnityEngine;
using System.Collections;

namespace Room
{
    public class RCAIUnionActorMove : RCAIUnionActorBase
    {
        protected override void OnEnter()
        {
            controller.owner.PlayAnim(AniName.RUN);
            if (controller.owner.name == StaticData.playerData.playerId.ToString())
            {
                EasyTouchTool.Instance.ShowJoystick();
            }
        }
        
        protected override void OnTick()
        {
            if (!controller.owner.IsMoving())
            {
                controller.SwitchState((int)UnionActorState.Stand);
            }
            else
            {
                controller.owner.PlayAnim(AniName.RUN);
            }
        }

        protected override void OnLeave()
        {

        }
    }
}